package com.atpy.rabbit.controller;

import com.atpy.rabbit.pojo.BannerImg;
import com.atpy.rabbit.service.BannerImgService;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin(origins = "*")
public class BannerImgController {

    @Autowired
    BannerImgService bannerImgService;

    @GetMapping("/bannerImgs")
    public List<BannerImg> getAllBannerImg (){
        List<BannerImg> allBanners = bannerImgService.getAllBanners();
        return allBanners;
    }



}
